jade.content.onto
Class FullOntology
java.lang.Object
|
+--jade.content.onto.Ontology
|
+--jade.content.onto.FullOntology
- Direct Known Subclasses:
- ACLOntology, BasicOntology
- public class FullOntology
- extends Ontology
|
Constructor Summary |
FullOntology(java.lang.String name)
Construct an ontology with a given name |
FullOntology(java.lang.String name,
Ontology base)
Construct an ontology with a given name that extends
base. |
FullOntology(java.lang.String name,
Ontology base,
Introspector introspector)
Construct an ontology with a given name that extends
base. |
|
Method Summary |
void |
add(ObjectSchema schema)
Adds a schema to the ontology |
void |
add(ObjectSchema schema,
java.lang.Class javaClass)
Adds a schema to the ontology and associates it to the class
javaClass |
AbsObject |
fromObject(java.lang.Object obj)
Converts an object to an abstract descriptor. |
java.lang.Class |
getClass(java.lang.String name)
Retrieves the concrete class associated with name in
the vocabulary. |
ObjectSchema |
getSchema(java.lang.Class javaClass)
Retrieves the schema associated with javaClass |
ObjectSchema |
getSchema(java.lang.String name)
Retrieves the schema associated with name. |
java.lang.Object |
toObject(AbsObject abs)
Converts an abstract descriptor to an object. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
introspector
protected Introspector introspector
FullOntology
public FullOntology(java.lang.String name)
- Construct an ontology with a given
name
- Parameters:
name - identifier of the ontology.
FullOntology
public FullOntology(java.lang.String name,
Ontology base)
- Construct an ontology with a given
name that extends
base.
- Parameters:
name - identifier of the ontology.base - base ontology.
FullOntology
public FullOntology(java.lang.String name,
Ontology base,
Introspector introspector)
- Construct an ontology with a given
name that extends
base. The object will use introspector
for serialization and de-serialization.
- Parameters:
name - identifier of the ontology.base - base ontology.introspector - the introspector.
add
public void add(ObjectSchema schema)
throws OntologyException
- Adds a schema to the ontology
- Overrides:
- add in class Ontology
- Parameters:
schema - the schema to add- Throws:
- OntologyException -
add
public void add(ObjectSchema schema,
java.lang.Class javaClass)
throws OntologyException
- Adds a schema to the ontology and associates it to the class
javaClass
- Overrides:
- add in class Ontology
- Parameters:
schema - the schema.javaClass - the concrete class.- Throws:
- OntologyException -
getSchema
public ObjectSchema getSchema(java.lang.String name)
throws OntologyException
- Retrieves the schema associated with
name.
- Overrides:
- getSchema in class Ontology
- Parameters:
name - the name of the schema in the vocabulary.- Returns:
- the schema.
- Throws:
- OntologyException -
getSchema
public ObjectSchema getSchema(java.lang.Class javaClass)
throws OntologyException
- Retrieves the schema associated with
javaClass
- Overrides:
- getSchema in class Ontology
- Parameters:
javaClass - the Java class- Returns:
- the schema
- Throws:
- OntologyException -
getClass
public java.lang.Class getClass(java.lang.String name)
throws OntologyException
- Retrieves the concrete class associated with
name in
the vocabulary.
- Overrides:
- getClass in class Ontology
- Parameters:
name - the name of the schema.- Returns:
- the Java class.
- Throws:
- OntologyException -
toObject
public java.lang.Object toObject(AbsObject abs)
throws OntologyException,
UngroundedException
- Converts an abstract descriptor to an object.
- Overrides:
- toObject in class Ontology
- Parameters:
abs - the abstract descriptor.- Returns:
- the object
- Throws:
- OntologyException -
- UngroundedException -
- See Also:
fromObject(Object)
fromObject
public AbsObject fromObject(java.lang.Object obj)
throws OntologyException
- Converts an object to an abstract descriptor.
- Overrides:
- fromObject in class Ontology
- Parameters:
obj - the object- Returns:
- the abstract descriptor.
- Throws:
- OntologyException -
- See Also:
toObject(AbsObject)